package com.hyt.it.ogt.pj.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hyt.core.base.BaseServiceImpl;
import com.hyt.it.ogt.pj.mapper.CertificateMapper;
import com.hyt.it.ogt.pj.model.entity.Certificate;
import com.hyt.it.ogt.pj.service.ICertificateService;

/**
 * <p>
 * 证书表 服务实现类
 * </p>
 *
 * @author qiaozj
 * @since 2020-07-09
 */
@Service
public class CertificateServiceImpl extends BaseServiceImpl<CertificateMapper, Certificate> implements ICertificateService {

    @Autowired
    private CertificateMapper certificateMapper;

    @Override
    public List<Certificate> findProjectCertificates(String projectId) {
        List<Certificate> certificates = certificateMapper.findProjectCertificates(projectId);
        return certificates;
    }

    @Override
    public boolean deleteByProjectId(String projectId) {
        certificateMapper.deleteByProjectId(projectId);
        return true;
    }
}
